﻿using Dapper;
using System;
using BCEntity.OA.WorkflowTemplate.WorkflowTemplateStepStartBaseConfig;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.WorkflowTemplate.WorkflowTemplateStepStartBaseConfig
{
	/// <summary>
	/// 工作流模板步骤开始配置
	/// </summary>
	public interface IWorkflowTemplateStepStartBaseConfigData
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="workflowTemplateStepStartBaseConfigId">工作流模板步骤开始配置Id</param>
		Task<bool> Exists(long workflowTemplateStepStartBaseConfigId);
		/// <summary>
		/// 增加工作流模板步骤开始配置
		/// </summary>
		/// <param name="entity">工作流模板步骤开始配置信息</param>
		Task<WorkflowTemplateStepStartBaseConfigEntity> Add(WorkflowTemplateStepStartBaseConfigEntity entity);
		/// <summary>
		/// 更新工作流模板步骤开始配置
		/// </summary>
		/// <param name="entity">工作流模板步骤开始配置信息</param>
		Task<WorkflowTemplateStepStartBaseConfigEntity> Update(WorkflowTemplateStepStartBaseConfigEntity entity);
		/// <summary>
		/// 删除工作流模板步骤开始配置
		/// </summary>
		/// <param name="workflowTemplateStepStartBaseConfigId">工作流模板步骤开始配置Id</param>
		Task<bool> Delete(long workflowTemplateStepStartBaseConfigId);
		/// <summary>
		/// 删除工作流模板步骤开始配置
		/// </summary>
		/// <param name="templateCode">工作流模板Code</param>
		Task<bool> Delete(string templateCode);
		/// <summary>
		/// 获取工作流模板步骤开始配置
		/// </summary>
		/// <param name="workflowTemplateStepStartBaseConfigId">工作流模板步骤开始配置Id</param>
		Task<WorkflowTemplateStepStartBaseConfigEntity> GetEntity(long workflowTemplateStepStartBaseConfigId);
		/// <summary>
		/// 获取工作流模板步骤开始配置
		/// </summary>
		/// <param name="templateStepCode">工作流模板步骤Code</param>
		Task<WorkflowTemplateStepStartBaseConfigEntity> GetEntity(string templateStepCode);
		/// <summary>
		/// 获取工作流模板步骤开始配置列表
		/// </summary>
		/// <param name="templateCode">工作流模板Code</param>
		Task<IEnumerable<WorkflowTemplateStepStartBaseConfigEntity>> GetList(string templateCode);
		/// <summary>
		/// 获取工作流模板步骤开始配置分页列表
		/// </summary>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">每页数据条数</param>
		Task<(IEnumerable<WorkflowTemplateStepStartBaseConfigEntity>, int)> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		#endregion  成员方法
	}


}